package com.eds.feign;

import com.pojo.Course;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @ClassName：CourseFeign
 * @Author: vvSmile
 * @Date: 2025/04/03
 * @Description: 必须描述类做什么事情, 实现什么功能
 */
@FeignClient("eds-frontend-course")
public interface CourseFeign {
    @PostMapping("/courseController/ordersSelectCourseByScheduleId")
    Course ordersSelectCourseByScheduleId(@RequestHeader("authorization") String token, @RequestParam("scheduleId") Long scheduleId);

    @PostMapping("/courseController/updateBookingStatus")
    int updateBookingStatus(@RequestParam("scheduleId") Long scheduleId, @RequestParam("status") int status);

    @GetMapping("/courseController/selectTeacherCourse")
    List<Course> selectCourseByTeacherIdAIUsed(@RequestParam("teacherId") Long teacherId);

    @GetMapping("/courseController/deleteCourseByTeacherId")
    int deleteCourseByTeacherId(@RequestParam("userId") Long userId);
}
